]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Remove dangerous explicit destroy
authorCosimo Cecchi <cosimo@endlessm.com>
Wed, 5 Jun 2013 20:54:09 +0000 (13:54 -0700)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 6 Jun 2017 15:38:45 +0000 (08:38 -0700)
There's no need to explicitly destroy the ClutterText actor inside the
label; doing so is actually harmful, as it will break the normal
reference cycle between container and children.
As StLabel doesn't hold any extra reference to the ClutterText actor and
just uses clutter_actor_add_actor() to add it to itself, let the normal
container dispose cycle run to dispose of the reference.

https://bugzilla.gnome.org/show_bug.cgi?id=783483

src/st/st-label.c

index 95ba895b72bebe2584fa288b5c2d14d0c9c5e20f..a7893b074523ee10e25c596f2c67059a96aece0c 100644 (file)
@@ -180,12 +180,6 @@ st_label_dispose (GObject   *object)
 {
   StLabelPrivate *priv = ST_LABEL (object)->priv;
 
-  if (priv->label)
-    {
-      clutter_actor_destroy (priv->label);
-      priv->label = NULL;
-    }
-
   g_clear_pointer (&priv->text_shadow_pipeline, cogl_object_unref);
 
   G_OBJECT_CLASS (st_label_parent_class)->dispose (object);